/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Lyn
 * Date: 2025-01-15
 * Time: 15:34
 */
class Student{
    public String name;
    public String address;
    public int years;
    public char sex;
    public void words(){
        System.out.println(this.name+" hello");
    }
    public void show(){
        System.out.println("姓名"+this.name+"年龄"+this.years);
    }
    public void years(){
        System.out.println("我"+this.years+"岁了");
        this.show();
    }
    public Student(){
        this("qwe",13);
        System.out.println("返回不带参数的构造方法");
    }
    public Student(String name,int years){
        this.name = name;
        this.years = years;
        System.out.println(name);
        System.out.println(years);
    }
    public Student(String name, String address, int years, char sex) {
        this.name = name;
        this.address = address;
        this.years = years;
        this.sex = sex;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
public class text {
    public static void main(String[] args) {
        Student first= new Student();
        System.out.println("=======================");
        first.years();
        first.name ="Lyn";
        first.sex = 'm';
        first.years = 18;
        first.words();
        first.years();
        System.out.println(first.name);
        System.out.println(first.sex);
        System.out.println("=======================");
       //Student student = new Student("sdsfee",22);
    }

}
